import React from 'react'
import {Card, Spin, Button, Icon, notification} from 'antd'
import './ui.less'

export default class Notice extends React.Component {
    handleClick = (type,placement) => {
        notification[type]({
            message:'提示..',
            description:'你的工资已经到账',
            placement
        })
    }
    render() {
        const icon = <Icon type={'loading'}/>
        return <div>
            <Card title={"notice通知用法"} className={"card-wrap"}>
                    <Button type={'primary'} onClick={()=>this.handleClick('success')}>success</Button>
                    <Button type={'primary'} onClick={()=>this.handleClick('info')}>info</Button>
                    <Button type={'primary'} onClick={()=>this.handleClick('error')}>error</Button>
                    <Button type={'primary'} onClick={()=>this.handleClick('warning')}>warning</Button>
                    <Button type={'primary'} onClick={()=>this.handleClick('open')}>open</Button>
            </Card>
            <Card title={"notice通知位置"} className={"card-wrap"}>
                <Button type={'primary'} onClick={()=>this.handleClick('success', 'topLeft')}>success</Button>
                <Button type={'primary'} onClick={()=>this.handleClick('info', 'bottomLeft')}>info</Button>
                <Button type={'primary'} onClick={()=>this.handleClick('error', 'topRight')}>error</Button>
                <Button type={'primary'} onClick={()=>this.handleClick('warning', 'bottomRight')}>warning</Button>
                <Button type={'primary'} onClick={()=>this.handleClick('open')}>open</Button>
            </Card>

        </div>
    }
}